package com.example.qxfw.qxybzz.service.Impl;

import com.example.qxfw.qxybzz.entity.SmallScaleStation;
import com.example.qxfw.qxybzz.entity.admincode;
import com.example.qxfw.qxybzz.mapper.CommonMapper;
import com.example.qxfw.qxybzz.service.CommonService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 14559
 * @version 1.0
 * @description: TODO
 * @date 2024/12/12 17:45
 */
@Service
public class CommonServiceImpl implements CommonService {

    @Resource
    private CommonMapper commonMapper;

    @Override
    public List<admincode> getCountys(String advcode) {
        if(advcode.length() == 6)
            advcode = advcode.substring(0,4);
        return commonMapper.getCountys(advcode);
    }

    @Override
    public List<SmallScaleStation> getCountyStation(String advname) {
        return commonMapper.getCountyStation(advname);
    }
}
